package com.huarun.common;

/**
 * 统一异常的实体对象
 * @author Administrator
 *
 */
public class CommonException extends Exception {
	
	private static final long serialVersionUID = 1L;

	private int code = 400; //异常状态码 
	
	private String message; //自定义返回给客户端的提示信息
	 
	private Exception exception; //真实异常对象，用于保存到系统日志使用
	
	public CommonException(int code, String message) {
		super();
		this.code = code;
		this.message = message;
	}
	public CommonException( String message) {
		super();
		this.message = message;
	}
	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}
	
	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
	public Exception getException() {
		return exception;
	}
	public void setException(Exception exception) {
		this.exception = exception;
	}
	

}
